package com.yqy.android;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import com.android.base.base.BaseTitleActivity;
import com.android.base.dialog.DialogFactory;
import com.android.base.dialog.fragment.ConfirmDialogFragment;
import com.android.base.dialog.fragment.ProgressDialogFragment;
import com.android.base.dialog.fragment.SimpleDialogFragment;
import com.android.base.dialog.fragment.TimePickerDialogFragment;
import com.android.base.dialog.iface.ISimpleDialogListener;
import com.android.base.jump.PanelManager;
import com.yqy.android.common.PanelFormManager;

import me.nereo.multi_image_selector.activity.TestActivity;


public class MainActivity extends BaseHomeActivity implements ISimpleDialogListener{

    private TextView test;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        test = (TextView) findViewById(R.id.test);
//        test.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                checkPermission(new CheckPermListener() {
//                    @Override
//                    public void superPermission(int requestCode) {
//                        ToastUtil.shortShow("相机可用");
//                    }
//                },0,R.string.camera, Manifest.permission.CAMERA);
//            }
//        });
//        test();
//        getDialogFactory().showProgressDialog(this,"正在加载",false);
        ConfirmDialogFragment.createBuilder(MainActivity.this,getSupportFragmentManager())
                .setCancelable(false).setTitle("测试title").setMessage("什么玩意").setPositiveButtonText("确定").setNegativeButtonText("取消").show();
    }

    @Override
    protected int getCurrentPage() {
        return 0;
    }

    @Override
    protected void initHeaderTitle() {

    }
    private void test() {
        Intent intent = new Intent(MainActivity.this, TestActivity.class);
        startActivity(intent);
    }

    @Override
    public int getPanelID() {
        return PanelFormManager.ID_MAIN;
    }

    @Override
    public void onNegativeButtonClicked(int requestCode) {
        Log.d("yqy","" + requestCode);
    }

    @Override
    public void onNeutralButtonClicked(int requestCode) {
        Log.d("yqy","" + requestCode);
    }

    @Override
    public void onPositiveButtonClicked(int requestCode) {
        Log.d("yqy","" + requestCode);
        PanelManager.getInstance().switchPanel(PanelFormManager.ID_LOGIN, null, null);
    }

//    @Override
//    public int pageStyle() {
//        return 1;
//    }
//
//    @Override
//    public int getLayoutId() {
//        return R.layout.layout_base_navigation;
//    }
}
